<template>
  <view class="" >
	<view class="daohanglan" style="background-image: url('https://zntg.swehszn.com/file/fb3277d5-f3d0-44b3-9ebd-b4ed1fc4328f.png');background-size:750upx 170rpx;">
		方案报价
	</view>
	<view class="textConter" >
		<view class="fuwuLMview" style="">
			
		
			<view class="" style="display: flex;align-items: center;">
				 <view class="yuanzhu" style="">
				 </view>
				 <view class="">
				 	服务类目
				 </view>
			</view>
			<view class="fananBGview" style="">
				{{fabjServiceTyData.serviceTypeName}}<uni-icons type="forward" color="rgb(16, 107, 250)" size="16"></uni-icons>
			</view>
		</view>
		
		<view class="fangjianview">
			<view class="" style="display: flex;justify-content:space-between;align-items: center;border-bottom: 1upx solid #eee;0 padding: 30upx;color: #555;">
				<scroll-view class="scroll-view_H" scroll-x="true" >
					<view class="" style="display: flex;align-items: flex-end;padding-left: 30upx;">
						<view class="" v-for="(item,index) in roomEntityList">
							<view class="fangjiantitle" @click="qiuhuanFj(index)"  v-if="!item.isDel">
								<view v-if="isFangjianIndex==index" class=""  style="color:#222;font-size: 34upx;font-weight: bold;border-bottom: 2px solid rgb(16, 107, 250);">
									{{item.roomName}}
								</view>
								<view v-else class="">
									{{item.roomName}}
								</view>
								
							</view>
						</view>
					</view>
				</scroll-view>
				<view @click="navHouseType" class="" style="color: rgb(31,119,243);font-size: 28upx;">
					配置<uni-icons type="forward" color="rgb(31,119,243)" size="16"></uni-icons>
				</view>
				
			</view>
			
			
			<view class="" style="margin: 0 20upx;">
				<view v-for="(item,index) in shanpingdata" class="" >
					
					<view class="" style="display: flex;justify-content: space-between;align-items: center;padding: 20upx 0;" @click="xianshiyc(index)">
						<view class="" style="display: flex;align-items: center;">
							<!-- <uni-icons type="pulldown" color="rgb(31,119,243)" size="16"></uni-icons> -->
							
							<view class="" v-if="isCH==2" style="margin-right: 10upx;">
								{{index+1}}
							</view>
							<view class="" style="width: 42upx;height:42upx;background-color: aquamarine;">
								<img :src="item.product.productImage"  style="width: 42upx;height:42upx;" alt="" />
							</view>
							<view class="" style="font-size: 26upx;margin-left: 20upx;">
								{{item.product.productName}}
							</view>
						</view>
						
						<view style="display: flex;align-items: flex-end;">
							<uni-section title="底部分享示例" type="line" padding>
							
							
							<view class="" style="font-size: 20upx;color: #666;margin-right: 20upx;" @click.stop="shareToggle(index)" >
								{{item.location?item.location.name:"隐藏位置"}}
							</view>
							</uni-section>
							<view class="" style="display: flex;align-items: center;"  v-if="isCH!=2">
								<view @click.stop="productAdd(0,index)" class="quanqunaView" style="color:rgb(31,119,243); border: 2upx solid rgb(31,119,243);">
									-
								</view>
								<view class="" style="margin: 0 5upx;min-width: 60upx;text-align: center;">
									{{item.count}}
								</view>
								<view @click.stop="productAdd(1,index)" class="quanqunaView" style="color: aliceblue;background: linear-gradient(135deg,#162aec , #11c0f9);">
									+
								</view>
							</view>
							<view class="" v-else>
								<view class="" style="margin: 0 5upx;min-width: 30upx;text-align: center;">
									{{item.count}}
								</view>
							</view>
						</view>
					</view>
					<view class="chanpingConter" style="" v-show="item.isShow">
						<view class="" style="display: flex;justify-content: space-between;">
							<view class="feiyongTitle">
								安装费用：{{item.product.productPrice}}
							</view>
							<view class="feiyongTitle">
								服务费用：{{item.product.serviceFee}}
							</view>
						</view>
						<view class=""  style="display: flex;justify-content: space-between;">
							<view class="feiyongTitle">
								调试费用：{{item.product.debuggingPrice}}
							</view>
							<view class="feiyongTitle">
								商品价格：{{item.product.productPrice}}
							</view>
						</view>
						<view class=""  style="display: flex;justify-content: space-between;">
							<view class="feiyongTitle">
								产品数量：{{item.count}}
							</view>
							<view class="feiyongTitle">
								产品型号：{{item.product.pdtModel}}
							</view>
						</view>
						
						<view class=""  style="display: flex;justify-content: space-between;color:#444;font-size: 24upx;">
						
							产品详情：{{item.product.funInfo}}
						</view>
					</view>
				</view>
			</view>
		</view>
		
		<view class="addchanpingView" style="" >
			<view class="" style="display: flex;align-items:flex-end;justify-content: space-between;width: 380upx;">
				<view class="" style="display: flex;align-items: center;">
					<view class="addchanpingbtn">
						+
					</view>
					
					<view @click="navProductIndex(fabjServiceTyData.serviceTypeId)" class="" style="margin-left: 18upx;">
						增加商品
					</view>
					
				</view>
				<view class="" style="font-size: 20upx;color: #666;">
					合计:{{hejiNum1}}/{{hejiNum2}}
				</view>
			</view>
			
			<view class="" style="display: flex;">
				<view class="chaifenBtn" @click="chaifen(2)" v-if="!isCH || isCH==1">
					拆分
				</view>
				<view class="chaifenBtn" @click="chaifen(1)" v-else>
					合并
				</view>
				<view class="bianjiBtn">
					编辑
				</view>
			</view>
		</view>
		
		
		<view class="" style="padding: 18upx 30upx 40upx 18upx;background-color: white;margin: 20upx 20upx;border-radius: 10upx;font-size: 24upx;">
			<view class="fuwuLMview" style="padding-left:0;">
				<view class="" style="display: flex;align-items: center;">
					 <view class="yuanzhu" style="">
					 </view>
					 <view class="">
					 	服务统计
					 </view>
				</view>
			</view>
			
			<view class="fuwutjView" style="background-color: rgb(250, 250, 250);">
				<view class="" style="display: flex;width: 600upx;">
					<view class="fuwutjName" style="width:130upx;">
						方案名称：
					</view>
					<view class="fuwutjText" style="width: 465upx;">
						{{fuwutongji.pgeName?fuwutongji.pgeName:"未创建方案"}}
					</view>
				</view>
				
			</view>
			<view class="fuwutjView" style="">
				<view class="" style="display: flex;width: 300upx;">
					
					<view class="fuwutjName">
						客户名称：
					</view>
					<view class="fuwutjText">
						{{fuwutongji.nickName?fuwutongji.nickName:"未选择"}}
					</view>
				</view>
				<view class="" style="display: flex;width: 300upx;">
					
					<view class="fuwutjName">
						联系电话：
					</view>
					<view class="fuwutjText">
						{{fuwutongji.phone?fuwutongji.phone:"未选择"}}
					</view>
				</view>
			</view>
			<view class="fuwutjView" style="background-color: rgb(250, 250, 250);">
				<view class="" style="display: flex;width: 600upx;">
					<view class="fuwutjName" style="width:130upx;">
						客户地址：
					</view>
					<view class="fuwutjText" style="width: 465upx;">
						{{fuwutongji.dizhi?fuwutongji.dizhi:"未选择"}}
					</view>
				</view>
				
			</view>
			
			<view class="fuwutjView" style="">
				<view class="" style="display: flex;width: 300upx;" >
					
					<view class="fuwutjName">
						服务工时：
					</view>
					<view class="fuwutjText" >
						{{parseInt(fuwutongji.fuwugongshi)}}小时
					</view>
				</view>
				<view class="" style="display: flex;width: 300upx;">
					<view class="fuwutjName">
						服务工费：
					</view>
					<view class="fuwutjText" >
						￥{{parseFloat(fuwutongji.fuwugongfei).toFixed(2)}}
					</view>
				</view>
				
				
			</view>
			<view class="fuwutjView" style="background-color: rgb(250, 250, 250);">
				<view class="" style="display: flex;width: 300upx;">
					
					<view class="fuwutjName">
						产品种类：
					</view>
					<view class="fuwutjText" >
						{{fuwutongji.productTypeNum}}种
					</view>
				</view>
				
				<view class="" style="display: flex;">
					<view class="fuwutjName">
						产品数量：
					</view>
					<view class="fuwutjText" >
						{{fuwutongji.productCount}}个
					</view>
				</view>
				
			</view>
			
			
			
			<view class="fuwutjView" style="">
				<view class="" style="display: flex;width: 300upx;">
					
					<view class="fuwutjName">
						服务费用：
					</view>
					<view class="fuwutjText" >
						￥{{parseFloat(fuwutongji.totalServiceFee).toFixed(2)}}
					</view>
				</view>
				<view class="" style="display: flex;">
					<view class="fuwutjName">
						安装调试：
					</view>
					<view class="fuwutjText" >
						￥{{parseFloat(fuwutongji.DebugPrice_InstallPrice).toFixed(2)}}
					</view>
				</view>
				
				
			</view>
			
			<view class="fuwutjView" style="background-color: rgb(250, 250, 250);">
				<view class="" style="display: flex;width: 300upx;">
					<view class="fuwutjName">
						商品总价：
					</view>
					<view class="fuwutjText" >
						￥{{parseFloat(fuwutongji.totalProductPrice).toFixed(2)}}
					</view>
				</view>
				<view class="" style="display: flex;width: 300upx;">
					<view class="fuwutjName">
						项目合计：
					</view>
					<view class="fuwutjText" >
						￥{{parseFloat(fuwutongji.proTotalPrice).toFixed(2)}}
					</view>
				</view>
				
			</view>
			
			
			<view class="" style="display: flex;justify-content: space-between;">
				<view class="">
					
				</view>
				<view class="" style="display: flex;color: aliceblue;margin-top: 20upx;">
					<view class="bianjiBtn" @click="chongzhiFC(0)">
						重置
					</view>
					<view class="bianjiBtn" @click="inputDialogToggle">
						<uni-icons type="cloud-download-filled" color="aliceblue" size="16" ></uni-icons>
						<!-- 这里缺一个图标 -->
						保存
					</view>
					
				</view>
			</view>
			
		</view>
		
		
		
		<view class="" style="padding: 18upx 30upx;background-color: white;margin: 20upx 20upx;border-radius: 10upx;">
			<view class="" style="display: flex;justify-content: space-between;padding:0 100upx" >
				<view class="" v-for="(item,index) in fangandata">
					<view class="" v-if="index==isMyfangan"  style="font-weight: bold;border-bottom: 4upx solid rgb(16, 107, 250);padding-bottom: 10upx;">
						{{item.typeName}}
					</view>
					<view class="" v-else @click="qiuhuanFA(index)">
						{{item.typeName}}
					</view>
				</view>
			</view>
			
			<view class="" v-if="fanganshuju.length!=0">
				
			
			<scroll-view class="scroll-view_w" scroll-y="true" >
				<radio-group @change="radioChangeFA">
					<view class="" v-for="(item,index) in fanganshuju">
						
						<view class="fanganview" >
							<view class="">
								<radio :value="index"  :checked="index == xunzeFAIndex"  color="rgb(25,137,250)"/>
								{{item.pgeName}}
							</view>
							<uni-icons @click="upDataFanfan" type="compose" size="24"></uni-icons>
							
							
						</view>
					</view>
				</radio-group>
				
				
			</scroll-view>
			</view>
			<view v-else class="" style="height: 270upx;padding-top: 30upx;display: flex;align-items: center;justify-content: center;">
				您还没有方案，请新增方案
				
			</view>
			<view style="display: flex;justify-content: space-between;margin-top: 10upx;">
				
				
				<view class="" style="display: flex;align-items: center;" v-if="isMyfangan==0">
					<!-- <view class="addchanpingbtn">
						+
					</view>
					<view class="" style="margin-left: 18upx;">
						新增方案
					</view> -->
				</view>
				<view class="" v-else>
					
				</view>
				<view class="" style="display: flex;">
					<view class="bianjiBtn" v-if="isMyfangan==0" @click="shareFA">
						分享
					</view>
					<view class="bianjiBtn" @click="yulanFA">
						预览
					</view>
					<view class="bianjiBtn" @click="openNewFA">
						打开
					</view>
					
					<view class="bianjiBtn" @click="deleteFA">
						删除
					</view>
				</view>
				
			</view>
			
			
		</view>
		
			<view class="fanbubtn" >
				发布订单
			</view>
		
		<view>
			<!-- 分享示例 -->
			<uni-popup ref="share" type="share" safeArea backgroundColor="#fff">
				<view class="" style="width: 750upx;text-align: center;margin: 20upx 0;">
					请选择安装位置
				</view>
				<radio-group @change="radioChangeWZ">
					
					<view class="" style="display: flex;flex-wrap: wrap;padding-left: 30upx;">
						<view  v-for="(item,index) in locationList" :key="item.value">
							<view class="" style="display: flex;width: 220upx;margin: 10upx;">
								<radio :value="index" :checked="index === current"  color="rgb(25,137,250)"/>
								<view>{{item.name}}</view>
							</view>
								
						</view>
						
					</view>
				</radio-group>
				<view class="" style="width: 750upx;height: 50upx;">
				</view>
				
				<!-- <uni-popup-share>
					
				</uni-popup-share> -->
			</uni-popup>
		</view>
		
	</view>
	<uni-popup ref="inputDialog" type="dialog">
		<uni-popup-dialog ref="inputClose"  mode="input" title="方案名称" 
			:placeholder="fuwutongji.pgeName?fuwutongji.pgeName:'请输入新增方案名称'" @confirm="dialogInputConfirm"></uni-popup-dialog>
	</uni-popup>
  </view>
</template>

<script>
  export default {
    data() {
      return {
		fabjServiceTyData:"",//方案报价服务类目 暂时写死取一个 方案报价
		serviceTypeId:0,//类目id	目前只拿方案报价的
		
		fangandata:"",//方案横列
		isMyfangan:0,//显示隐藏我的方案和系统方案
		fanganshuju:"",//我的方案/系统方案	其中一个列表
		xunzeFAIndex:-1,//选择方案下标  方案数据下标
		
		roomEntityList:"",//首页房间列表
		morenhuxingData:"",//默认户型及其 一些默认房间列表
		
		isFangjianIndex:0,//显示隐藏不同房间下安装产品数据
		
		pageNum: 1,//自定义参数
		pageSize: 30,//自定义参数
		SERVICE_HOURS_DAY:0,//系统参数 一天工作时长
		SERVICE_HOURS_PRICE:0,//系统参数 一天工价
		
		shanpingdata:"",//商品列表选中的数据
		shanpingindex:0,//房间下产品
		
		allLocation:"",//所有产品安装位置
		locationList:[],//对应不同房间有效的产品安装位置
		locationindex:[],//产品安装位置下标
		
		
		isCH:0,//判断拆分合并状态 0 初始合并状态	1合并状态 2拆分状态
		programmeData:{},//方案详情数
		aa:0,
		
		hejiNum1:0,
		hejiNum2:0,//hejicount
		
		
		// 商品选择数据记录
		PshanpingtitleData:[],
		PhejiNum:0,
		
		fuwutongji:{"id":"","pgeName":"","productCount":0,"productTypeNum":0,"DebugPrice_InstallPrice":0,"nickName":"","totalProductPrice":0,"totalServiceFee":0,"phone":"","proTotalPrice":0,"dizhi":"","fuwugongshi":0,"fuwugongfei":0,},//服务统计
		// fuwutongji:"",
		
		// 对应房间的铲平
		roomProductEntityList:"",//拆分过的 单个的
		roomProductList:"",//没拆分的
		
		addressData:"",
		
		/**
		 * {
			  "addressEntity": {
				"addressId": 0,
				"area": "string",
				"city": "string",
				"costomerName": "string",
				"create_time": "2024-09-11T06:03:17.667Z",
				"detail": "string",
				"is_default": 0,
				"nickName": "string",
				"phone": "string",
				"province": "string",
				"userId": 0
			  },
			  
			  "addressId": 0,
			  "createUserId": 0,
			  "houseTypeItem": {
				"createTime": "2024-09-11T06:03:17.667Z",
				"createUserId": 0,
				"decorationDesign": "string",
				"decorationProgress": "string",
				"deliveryStatus": "string",
				"deliveryTime": "string",
				"houseArea": 0,
				"houseName": "string",
				"housePty": "string",
				"id": 0,
				"imgUrl": "string",
				"isDefault": 0,
				"isDel": 0,
				"localNameStr": "string",
				"projectBudget": 0,
				"remark": "string",
				"roomNameStr": "string",
				"roomNames": "string",
				"rooms": [
				  {
					"createTime": "2024-09-11T06:03:17.667Z",
					"createUserId": 0,
					"floorCode": "string",
					"id": 0,
					"imgUrl": "string",
					"isDel": 0,
					"locationNameStr": "string",
					"remark": "string",
					"roomLocation": "string",
					"roomName": "string",
					"typeId": 0,
					"updateTime": "2024-09-11T06:03:17.667Z",
					"updateUserId": 0,
					"userId": 0
				  }
				],
				"typeId": 0,
				"updateTime": "2024-09-11T06:03:17.667Z",
				"updateUserId": 0,
				"user": {
				  "age": 0,
				  "applyImage": "string",
				  "applyImageVo": [
					"string"
				  ],
				  "applyReson": "string",
				  "avatar": "string",
				  "children": [
					{
					  "create_time": "2024-09-11T06:03:17.667Z",
					  "skillId": 0,
					  "skillName": "string"
					}
				  ],
				  "code": "string",
				  "content": "string",
				  "create_time": "2024-09-11T06:03:17.667Z",
				  "nickName": "string",
				  "openid": "string",
				  "password": "string",
				  "phone": "string",
				  "reson": "string",
				  "reviceOrderTotal": 0,
				  "score": 0,
				  "serviceProviderStatus": 0,
				  "skillsId": "string",
				  "total": 0,
				  "userId": 0,
				  "userName": "string",
				  "workAge": 0
				},
				"userId": 0
			  },
			  "houseTypeItemId": 0,
			  "id": 0,
			  "isDel": 0,
			  "pgeName": "string",
			  "priceDiscountPdt": "string",
			  "priceDiscountSev": "string",
			  "priceModel": "string",
			  "proTotalPrice": 0,
			  "productCount": 0,
			  "productTypeNum": 0,
			  "reportPdfUrl": "string",
			  "roomEntityList": [
				{
				  "createTime": "2024-09-11T06:03:17.667Z",
				  "createUserId": 0,
				  "debugPrice": 0,
				  "floorCode": "string",
				  "id": 0,
				  "installPrice": 0,
				  "isDel": 0,
				  "pgeId": 0,
				  "productCount": 0,
				  "productPrice": 0,
				  "productTypeNum": 0,
				  "roomLocation": "string",
				  "roomName": "string",
				  "roomProductEntityList": [
					{
					  "count": 0,
					  "createTime": "2024-09-11T06:03:17.667Z",
					  "createUserId": 0,
					  "debuggingPrice": 0,
					  "id": 0,
					  "installationPrice": 0,
					  "isDel": 0,
					  "location": {
						"code": "string",
						"createTime": "2024-09-11T06:03:17.667Z",
						"createUserId": 0,
						"id": 0,
						"isDel": 0,
						"name": "string",
						"parentId": 0,
						"remark": "string",
						"simId": "string",
						"sortId": 0,
						"updateTime": "2024-09-11T06:03:17.667Z",
						"updateUserId": 0
					  },
					  "locationId": 0,
					  "pgeRoomId": 0,
					  "product": {
						"acceptanceId": 0,
						"carous": "string",
						"classifyName": "string",
						"classifyTypes": "string",
						"color": "string",
						"content": "string",
						"create_time": "2024-09-11T06:03:17.667Z",
						"debuggingPrice": 0,
						"funInfo": "string",
						"installationPrice": 0,
						"pdtModel": "string",
						"productClassifyId": 0,
						"productCode": "string",
						"productId": 0,
						"productImage": "string",
						"productName": "string",
						"productPrice": 0,
						"serviceDuration": 0,
						"serviceFee": 0,
						"servicePdtRange": "string",
						"serviceProRange": "string",
						"serviceTypeId": 0,
						"serviceTypes": "string",
						"skills": "string",
						"skillsVo": [
						  {
							"create_time": "2024-09-11T06:03:17.667Z",
							"skillId": 0,
							"skillName": "string"
						  }
						],
						"status": 0,
						"subid": 0,
						"typeNo": "string",
						"unitId": 0,
						"update_time": "2024-09-11T06:03:17.667Z"
					  },
					  "productId": 0,
					  "productPrice": 0,
					  "propertyId": 0,
					  "reportTotal": 0,
					  "serviceDuration": 0,
					  "serviceFee": 0,
					  "total": 0,
					  "updateTime": "2024-09-11T06:03:17.667Z",
					  "updateUserId": 0
					}
				  ],
				  "servicePrice": 0,
				  "totalPrice": 0,
				  "updateTime": "2024-09-11T06:03:17.667Z",
				  "updateUserId": 0
				}
			  ],
			  "roomNameStr": "string",
			  "serviceTypeId": 0,
			  "totalDebugPrice": 0,
			  "totalInstallPrice": 0,
			  "totalProductPrice": 0,
			  "totalServiceFee": 0,
			  "typeId": 0,
			  "updateTime": "2024-09-11T06:03:17.667Z",
			  "updateUserId": 0,
			  "userId": 0
			}
		 * 
*/ 
		
		
      }
    },
    onLoad(options) {
		console.log("options:",options)
		
		
		// this.getSysConfigInfoFC()// 获取系统配置信息 服务工时单价
			
    },
	onShow(opt) {
		
		if( !uni.getStorageSync("token")){
			uni.showModal({
				title: '登录提示',
				content: '您还未登录，请登录以继续使用',
				// showCancel: false,
				success(res) {
					if (res.confirm) {
						uni.navigateTo({
							url: '/pages/login/psdLogin',
						})
					}else if (res.cancel) {
						uni.switchTab({
							url: '/pages/home/index'
						});
					}
					
				}
			})
		}else{
			this.getServiceTypeAllFC()//获取所有服务类目
			this.isCH=0
			if(this.hejiNum1!=0 && this.shanpingdata.length!=0){
				this.chanpinfz(this.isCH,this.shanpingdata)
			}
			if(!this.roomEntityList){
				this.getDefaultHouseTypeFC()// 获取系统定义的默认户型
			}
			this.getProgrammeTypeAllFC()// 获取方案
		}
	},
    methods: {
		chongzhiFC(isInputDT){
			this.hejiNum1=0
			this.hejiNum2=0
			this.isFangjianIndex=0
			this.shanpingindex=0
			this.xunzeFAIndex=-1
			this.isCH=0
			this.PshanpingtitleData=[]
			this.roomEntityList=""
			this.shanpingdata=""
			this.addressData=""
			this.fuwutongji={"id":"","pgeName":"","productCount":0,"productTypeNum":0,"DebugPrice_InstallPrice":0,"nickName":"","totalProductPrice":0,"totalServiceFee":0,"phone":"","proTotalPrice":0,"dizhi":"","fuwugongshi":0,"fuwugongfei":0,}//服务统计
			this.$forceUpdate() //强制渲染
			this.getServiceTypeAllFC()//获取所有服务类目
			if(!this.roomEntityList){
				this.getDefaultHouseTypeFC()// 获取系统定义的默认户型
			}
			this.getProgrammeTypeAllFC()// 获取方案
			
				// if(isInputDT==1){
				// 	this.inputDialogToggle()
				// }
		},
		//弹出新增方案
		inputDialogToggle() {
			this.$refs.inputDialog.open()
		},
		
		// 输入完方案名称保存方案
		dialogInputConfirm(val) {
			console.log(val)
			if(!this.fuwutongji.id){
				
					this.fuwutongji.pgeName=val
				// var programmeData={}
				this.programmeData.pgeName=this.fuwutongji.pgeName
				this.programmeData.productTypeNum=this.fuwutongji.productTypeNum
				this.programmeData.productCount=this.fuwutongji.productCount
				this.programmeData.serviceTypeId=this.fabjServiceTyData.serviceTypeId
				this.programmeData.houseName=this.morenhuxingData.houseName
				this.programmeData.houseTypeItemId=this.morenhuxingData.id
				this.programmeData.remark=this.morenhuxingData.remark
				this.programmeData.imgUrl=this.morenhuxingData.imgUrl
				// this.programmeData.addressEntity=this.addressData
				// for(var i=0;i<this.morenhuxingData.rooms.length;i++){
				// 	for(var j=0;j<this.morenhuxingData.rooms[i].roomProductList)
				// }
				
				for(var i=0;i<this.roomEntityList.length;i++){
					
					console.log(!this.roomEntityList[i].roomProductEntityList && this.roomEntityList[i].roomProductList.length!=0)
					
					// this.roomEntityList[i].roomProductEntityList?this.roomEntityList[i].roomProductEntityList:[]
					this.roomEntityList[i].tid=this.roomEntityList[i].id
					
					this.roomEntityList[i].id=""
					
					
				
					if(this.roomEntityList[i].roomProductEntityList.length==0 && this.roomEntityList[i].roomProductList.length!=0){
						this.isFangjianIndex=i
						var s=0
						// this.roomProductEntityListFC(this.isCH)
						for(var j=0; j<this.roomEntityList[i].roomProductList.length;j++){
							for(var k=this.roomEntityList[i].roomProductList[j].count;k>0;k--){
								// this.roomEntityList[i].roomProductEntityList=this.roomEntityList[i].roomProductList
								this.roomEntityList[i].roomProductEntityList[s]=this.roomEntityList[i].roomProductList[j].product
								this.roomEntityList[i].roomProductEntityList[s].count=1
								this.roomEntityList[i].roomProductEntityList[s].isDel=0
								this.roomEntityList[i].roomProductEntityList[s].isShow=1
								s+=1
							}
						}
						console.log(i,this.roomEntityList[i].roomProductEntityList)
					}
					console.log("roomProductEntityList-----",this.roomEntityList[i].roomProductEntityList)
					
				}
				this.isFangjianIndex=-1
				this.programmeData.roomEntityList=this.roomEntityList
				
				this.programmeData.totalPrice=0
				this.programmeData.debugPrice=0
				this.programmeData.programmeTotalPrice=0
				this.programmeData.serviceDuration=0
				this.programmeData.servicePrice=0
				
				console.log(this.programmeData)
				
				this.saveOrUpdateProgrammesFC(this.programmeData)
				this.$refs.inputDialog.close()
			}
			else{
				console.log("保存前：",this.fanganshuju[this.xunzeFAIndex])
				this.fanganshuju[this.xunzeFAIndex].pgeName=val
				if(!this.fanganshuju[this.xunzeFAIndex].addressId){
					// this.fanganshuju[this.xunzeFAIndex].addressEntity=this.addressData
					this.fanganshuju[this.xunzeFAIndex].addressId=this.addressData?this.addressData.addressId:""
				}
				for(var i=0;i<this.roomEntityList.length;i++){
					if( this.roomEntityList[i].roomProductList && this.roomEntityList[i].roomProductList.length!=0){
						this.isFangjianIndex=i
						var s=this.roomEntityList[i].roomProductEntityList.length?this.roomEntityList[i].roomProductEntityList.length:0
						// this.roomProductEntityListFC(this.isCH)
						for(var j=0; j<this.roomEntityList[i].roomProductList.length;j++){
							for(var k=this.roomEntityList[i].roomProductList[j].count;k>0;k--){
								// this.roomEntityList[i].roomProductEntityList=this.roomEntityList[i].roomProductList
								this.roomEntityList[i].roomProductEntityList[s]=this.roomEntityList[i].roomProductList[j].product
								this.roomEntityList[i].roomProductEntityList[s].count=1
								this.roomEntityList[i].roomProductEntityList[s].isDel=0
								this.roomEntityList[i].roomProductEntityList[s].isShow=1
								s+=1
							}
						}
					}
				}
				this.fanganshuju[this.xunzeFAIndex].roomEntityList=this.roomEntityList
				console.log("保存中：",this.fanganshuju[this.xunzeFAIndex])
				this.saveOrUpdateProgrammesFC(this.fanganshuju[this.xunzeFAIndex])
				this.$refs.inputDialog.close()
			}
			
		},
		
		// 选中的方案
		radioChangeFA(e){
			console.log(e)
			this.xunzeFAIndex=e.detail.value
			this.getSysConfigInfoFC()
			// this.fanganshuju[]
		},
		// 分享方案
		shareFA: async function(){
			if(this.xunzeFAIndex==-1){
				uni.showToast({
					title: '请先选择方案',
					icon:"none",
					duration:1000,
				})
			}else{
				const shareProgrammeById = await this.$ajax.shareProgrammeById(this.fanganshuju[this.xunzeFAIndex].id)
				console.log("shareProgrammeById",shareProgrammeById)
				if(shareProgrammeById.data.code==200){
					uni.previewImage({
						urls: [shareProgrammeById.data.data],
						current: shareProgrammeById.data.data
					})
				}
			}
			
		},
		// 预览方案
		yulanFA: async function(){
			if(this.xunzeFAIndex==-1){
				uni.showToast({
					title: '请先选择方案',
					icon:"none",
					duration:1000,
				})
			}else{
				const reportPdf = await this.$ajax.reportPdf({
					id:this.fanganshuju[this.xunzeFAIndex].id,
					isNew:1
				})
				if(reportPdf.data.code==200){
					uni.downloadFile({
					  url: reportPdf.data.data,
					  success: function (res) {
					    var filePath = res.tempFilePath;
					    uni.openDocument({
					      filePath: filePath,
					      showMenu: true,
					      success: function (res) {
					        console.log('打开文档成功');
					      }
					    });
					  }
					});
				}
				console.log("reportPdf：",reportPdf)
			}
			
		},
		// 点击图标修改方案
		upDataFanfan(){
			if(this.xunzeFAIndex==-1){
				uni.showToast({
					duration:1000,
					title:"请选择一个方案进行修改",
					icon:"none",
				})
			}else{
				this.openNewFA()
				this.inputDialogToggle()
			}
			
		},
		// 删除方案
		deleteFA(){
			if(this.xunzeFAIndex==-1){
				uni.showToast({
					title: '请先选择方案',
					icon:"none",
					duration:1000,
				})
			}else{
				this.fanganshuju[this.xunzeFAIndex].isDel=1
				this.saveOrUpdateProgrammesFC(this.fanganshuju[this.xunzeFAIndex])
			}
		},
		// 打开方案
		openNewFA(){
			// hejiNum1}}/{{hejiNum2
			// var addressEntitys=this.fanganshuju[this.xunzeFAIndex].addressEntity
			this.shanpingdata=""
			this.morenhuxingData=this.fanganshuju[this.xunzeFAIndex]
			this.fuwutongji.id=this.fanganshuju[this.xunzeFAIndex].id	
			this.fuwutongji.pgeName=this.fanganshuju[this.xunzeFAIndex].pgeName	
			
			
			this.fuwutongji.productCount=this.fanganshuju[this.xunzeFAIndex].productCount
			this.fuwutongji.productTypeNum=this.fanganshuju[this.xunzeFAIndex].productTypeNum
			this.hejiNum1=this.fuwutongji.productTypeNum
			this.hejiNum2=this.fuwutongji.productCount
			
			this.fuwutongji.DebugPrice_InstallPrice=(parseInt(this.fanganshuju[this.xunzeFAIndex].totalInstallPrice*10000)+parseInt(this.fanganshuju[this.xunzeFAIndex].totalDebugPrice*10000))/10000
			this.fuwutongji.totalServiceFee=this.fanganshuju[this.xunzeFAIndex].totalServiceFee
			this.fuwutongji.proTotalPrice=this.fanganshuju[this.xunzeFAIndex].proTotalPrice
			this.fuwutongji.totalProductPrice=this.fanganshuju[this.xunzeFAIndex].totalProductPrice
			for(var i=0;i<this.fanganshuju[this.xunzeFAIndex].roomEntityList.length;i++){
				for(var j=0;j<this.fanganshuju[this.xunzeFAIndex].roomEntityList[i].roomProductEntityList.length;j++){
					this.fuwutongji.fuwugongshi+=this.fanganshuju[this.xunzeFAIndex].roomEntityList[i].roomProductEntityList[j].product.serviceDuration
				}
			}
			this.fuwutongji.fuwugongfei=parseInt(Math.ceil(this.fuwutongji.fuwugongshi/this.SERVICE_HOURS_DAY)*this.SERVICE_HOURS_PRICE*10000)/10000
			
			if(this.fanganshuju[this.xunzeFAIndex].addressEntity){
				
				this.fuwutongji.nickName=this.fanganshuju[this.xunzeFAIndex].addressEntity.nickName?this.fanganshuju[this.xunzeFAIndex].addressEntity.nickName:""
				this.fuwutongji.phone=this.fanganshuju[this.xunzeFAIndex].addressEntity.phone?this.fanganshuju[this.xunzeFAIndex].addressEntity.phone:""
				this.fuwutongji.dizhi=this.fanganshuju[this.xunzeFAIndex].addressEntity.detail?this.fanganshuju[this.xunzeFAIndex].addressEntity.province+this.fanganshuju[this.xunzeFAIndex].addressEntity.city+this.fanganshuju[this.xunzeFAIndex].addressEntity.area+this.fanganshuju[this.xunzeFAIndex].addressEntity.detail:""
			}else{
				this.fuwutongji.nickName=""
				this.fuwutongji.phone=""
				this.fuwutongji.dizhi=""
			}
			this.roomEntityList=this.fanganshuju[this.xunzeFAIndex].roomEntityList
			if(this.roomEntityList!=0){
				
				this.shanpingdata=this.fanganshuju[this.xunzeFAIndex].roomEntityList.length!=0?this.fanganshuju[this.xunzeFAIndex].roomEntityList[this.isFangjianIndex].roomProductEntityList:""
				if(this.fanganshuju[this.xunzeFAIndex].roomEntityList[this.isFangjianIndex].roomProductEntityList){
					this.chanpinfz(2,this.shanpingdata)
				}
				this.isCH=1
				
				this.$forceUpdate() //强制渲染
			}else{
				this.shanpingdata=""
				this.roomProductEntityList=""
				this.roomProductList=""
			}
			
		},
		// 产品赋值
		chanpinfz(zt,Productdata){
			
			this.shanpingdata=""
			this.roomProductEntityList=""
			this.roomProductList=""
			if(zt==2 && Productdata.length!=0 ){
				this.roomProductEntityList=Productdata
				var str =JSON.stringify(this.roomProductEntityList) 
				// console.log("str",str)
				var s=0
				var arr=[]
				var ids=[]
				ids[0]=Productdata[0].product.productId
				var id=Productdata[0].product.productId
				arr[0]=Productdata[0]
				for(var i=1;i<Productdata.length;i++){
					for(var j=0;j<ids.length;j++){
						if(Productdata[i].product.productId==ids[j]){
							arr[j].count+=1
							j=ids.length
						}
						if(j==ids.length-1 && Productdata[i].product.productId!=ids[j]){
							s=s+1
							ids[s]=Productdata[i].product.productId
							arr[s]=Productdata[i]
						}
					}
					Productdata[i].count=1
				}
				this.roomProductList=arr
				this.roomEntityList[this.isFangjianIndex].roomProductList=arr
				this.roomProductEntityList=JSON.parse(str)
				this.shanpingdata=arr
				this.fanganshuju[this.xunzeFAIndex].roomEntityList[this.isFangjianIndex].roomProductEntityList=JSON.parse(str)
				this.roomEntityList[this.isFangjianIndex].roomProductEntityList=JSON.parse(str)
				this.isCH=zt
			}
			
			if((zt==0 || zt==1) && Productdata!=0){
				console.log("进来了没有",Productdata)
				if(Productdata[0].productcount){
					var arr=[]
					var a={count:0,product:""}
					
					for(var i=0;i<Productdata.length;i++){
						arr[i]=a
						arr[i].count=Productdata[i].productcount
						arr[i].product=Productdata[i]
					}
					this.roomProductList=arr
					this.shanpingdata=this.roomProductList
					this.roomEntityList[this.isFangjianIndex].roomProductList=arr
					var crr=JSON.stringify(this.roomEntityList)
					this.roomProductEntityListFC()
					
				}
				else if(Productdata[0].count){
					console.log("再进来了没有",Productdata)
					this.shanpingdata=Productdata
					this.roomProductList=Productdata
					this.roomEntityList[this.isFangjianIndex].roomProductList=Productdata
					var crr=JSON.stringify(this.roomEntityList)
					console.log(this.isFangjianIndex+"---====----",this.roomEntityList[this.isFangjianIndex])
					this.roomProductEntityListFC()
				}
				this.roomEntityList=JSON.parse(crr)
				this.isCH=zt
			}
			this.$forceUpdate() //强制渲染
		},
		// 选中安装位置
		radioChangeWZ(e){
			this.locationindex=e.detail.value
			console.log(this.locationindex)
			if(this.roomEntityList[this.isFangjianIndex].roomProductList && this.roomEntityList[this.isFangjianIndex].roomProductList.length!=0){
				
				this.roomEntityList[this.isFangjianIndex].roomProductList[this.shanpingindex].location=this.locationList[this.locationindex]
			}
			if(this.roomEntityList[this.isFangjianIndex].roomProductEntityList && this.roomEntityList[this.isFangjianIndex].roomProductEntityList.length!=0){
				this.roomEntityList[this.isFangjianIndex].roomProductEntityList[this.shanpingindex].location=this.locationList[this.locationindex]
			}
			this.shanpingdata[this.shanpingindex].location=this.locationList[this.locationindex]
			this.$forceUpdate() //强制渲染
		},
		shareToggle(index) {
			this.shanpingindex=index
			// this.data	
			this.$refs.share.open()
		},
		// 切换方案
		qiuhuanFA(index){
			this.isMyfangan=index
			this.getProgrammesByTypeIdFC(this.fangandata[this.isMyfangan].id)
			this.xunzeFAIndex=-1
		},
		// 切换房间
		qiuhuanFj(index){
			console.log("qiuhuanFj-===--",this.roomEntityList)
			this.isFangjianIndex=index
			this.locationList=[]
			this.locationListFC()
	// 		console.log("xunzeFAIndex---",this.xunzeFAIndex)
	// 		if(this.xunzeFAIndex==-1){
	// 			this.shanpingdata=this.roomEntityList[this.isFangjianIndex].roomProductList?this.roomEntityList[this.isFangjianIndex].roomProductList:""
	// 		}else{
	// 			this.shanpingdata=this.fanganshuju[this.xunzeFAIndex].roomEntityList.length!=0?this.fanganshuju[this.xunzeFAIndex].roomEntityList[this.isFangjianIndex].roomProductEntityList:""	
	// 		}
			this.roomProductEntityList=this.roomEntityList[this.isFangjianIndex].roomProductEntityList
			this.roomProductList=this.roomEntityList[this.isFangjianIndex].roomProductList?this.roomEntityList[this.isFangjianIndex].roomProductList:[]
			if(this.isCH=2){
				
				this.shanpingdata=this.roomEntityList[this.isFangjianIndex].roomProductEntityList?this.roomEntityList[this.isFangjianIndex].roomProductEntityList:""
				if(!this.shanpingdata || this.shanpingdata.length!=0){
					this.chanpinfz(0,this.shanpingdata)
				}
			}else {
				this.shanpingdata=this.roomEntityList[this.isFangjianIndex].roomProductList?this.roomEntityList[this.isFangjianIndex].roomProductList:""
			}
			// if(this.)
			
			// this.shanpingdata=this.roomEntityList[this.isFangjianIndex].roomProductEntityList?this.roomEntityList[this.isFangjianIndex].roomProductEntityList:""
			this.$forceUpdate() //强制渲染
			
		},
		// 显示隐藏产品详情数据
		xianshiyc(xsindex){
			console.log(this.shanpingdata.length,xsindex)
			this.shanpingdata[xsindex].isShow=this.shanpingdata[xsindex].isShow?0:1
			this.$forceUpdate() //强制渲染
		},
		
		// 产品加减
		productAdd(addNum,index){
			
				// console.log(addNum,index)
			if(addNum){
				this.shanpingdata[index].productcount+=1
				this.roomProductEntityListFC(0)
				
			}else if(this.shanpingdata[index].productcount!=0 && this.shanpingdata[index].productcount!=1){
				this.shanpingdata[index].productcount-=1
				this.roomProductEntityListFC(0)
			}
			this.$forceUpdate() //强制渲染
		},
		// 给roomProductList赋值
		roomProductListFC(){
			
			// console.log(this.roomProductList==this.roomProductEntityList)
			if(this.roomProductList.length!=this.roomProductEntityList.length && this.roomProductList.length!=0){
				return	this.roomProductList
			}else{
				var arr=[]
				console.log("给roomProductList赋值：roomProductEntityList",this.roomProductEntityList)
				console.log("给roomProductList赋值：roomProductList",this.roomProductList)
				if(this.roomProductEntityList && this.roomProductEntityList.length!=0){
					// if(!this.roomProductList && this.roomProductList.length==0){
						this.roomProductList=[]
						console.log("进..",arr)
						arr[0]=this.roomProductEntityList[0]
						arr[0].count=1
						var s=0
						for(var i=1;i<this.roomProductEntityList.length;i++){
							
							for(var j=0;j<arr.length;j++){
								if(this.roomProductEntityList[i].productId==arr[j].productId){
									arr[j].count+=1
									j=arr.length
								}else if(j==arr.length-1 && arr[j].productId!=this.roomProductEntityList[i].productId){
									s+=1
									arr[s]=this.roomProductEntityList[i]
									// arr[s].count=1
								}
								
							}
							this.roomProductEntityList[i].count=1
							
							
							// if(this.roomProductEntityList[i].productId&&this.roomProductEntityList[i].productId!=arr[s].productId){
							// 	s+=1
							// 	arr[s]=this.roomProductEntityList[i]
							// 	arr[s].count=1
							// }else if(this.roomProductEntityList[i].productId&&this.roomProductEntityList[i].productId==arr[s].productId){
							// 	arr[s].count+=1
							// }
							// this.roomProductEntityList[i].count=1
						}
					// }
					
				}
				console.log("给roomProductList赋值：",arr)
				return arr
			}
			
		},
		// 商品加 减 拆分 给roomProductEntityList赋值
		roomProductEntityListFC(isCHs){
			console.log("------给roomProductEntityList赋值-------",this.shanpingdata)
			var s=0
			const arr=[]
			var brr=JSON.stringify(this.shanpingdata)
			brr=JSON.parse(brr)
			console.log("---brr",brr)
			for(var i=0;i<brr.length;i++){
				if(brr[i].count ){
					for(var j=brr[i].count;j>0;j--){
						arr[s]=brr[i]
						arr[s].count=1
						s+=1
					}
				}else{
					for(var j=brr[i].productcount;j>0;j--){
						arr[s]=brr[i]
						arr[s].productcount=1
						s+=1
					}
				}
				
			}
			console.log(arr)
			if(isCHs==1){
				this.shanpingdata=arr
			}
			this.roomProductEntityList=arr
			// console.log("-----给roomProductEntityList赋值--",arr)
			// return arr
			this.roomEntityList[this.isFangjianIndex].roomProductEntityList=this.roomProductEntityList
		},
		// 点击拆分 ...合并
		chaifen(isCHs){
			console.log("---0 初始合并状态	1合并状态 2拆分状态----"+this.isCH,isCHs)
			console.log(isCHs,this.shanpingdata)
			if(this.shanpingdata&&this.shanpingdata.length!=0){
				if(!this.isCH){
					this.roomProductEntityListFC(this.isCH)
				}else{
					if(isCHs==1){
						this.shanpingdata=this.roomProductListFC()
					}else if(isCHs==2){
						this.roomProductEntityListFC(1)
						// this.shanpingdata=this.roomProductEntityListFC
							// this.roomProductEntityListFC(2,this.shanpingdata)
					}
					
					// if(isCHs==1){
					// 	this.shanpingdata=this.roomEntityList[this.isFangjianIndex].roomProductList
					// }else if(isCHs==2){
					// 	this.shanpingdata=this.roomEntityList[this.isFangjianIndex].roomProductEntityList
					// }
					
				}
				
				this.isCH=isCHs
				this.$forceUpdate() //强制渲染
			}
			else{
				uni.showToast({
					title: '请增加商品数据',
					icon:"none",
					duration: 1000
				});
			}
			
		},
		// 筛选不同房间有效的产品安装位置
		locationListFC(){
			var roomLocationCodes = this.roomEntityList[this.isFangjianIndex].roomLocation.split(",")
			console.log("locationList",roomLocationCodes)
			var s=0
			for(var i=0;i<this.allLocation.length;i++){
				for(var j=0;j<roomLocationCodes.length;j++){
					if(this.allLocation[i].code+""==roomLocationCodes[j]){
						this.locationList[s]=this.allLocation[i]
						s+=1
					}
				}
			}
			console.log("ssssssss",this.locationList)
		},
		// 跳转到选择商品页面
		navProductIndex(serviceTypeId){
			if(this.roomEntityList&&this.roomEntityList.length!=0){
				if(this.PhejiNum){
					this.PhejiNum=this.PshanpingtitleData[this.isFangjianIndex]?this.PshanpingtitleData[this.isFangjianIndex].length:0
					uni.navigateTo({
						url:"/pages/packageOrder/product/index?id="+serviceTypeId+"&&isFangjianIndex="+this.isFangjianIndex+"&&hejiNum2="+this.hejiNum2+"&&PhejiNum="+this.PhejiNum+"&&PshanpingtitleData="+JSON.stringify(this.PshanpingtitleData[this.isFangjianIndex])+"&&shanpingdata="+JSON.stringify(this.shanpingdata)
					})
				}else if(this.shanpingdata){
					uni.navigateTo({
						url:"/pages/packageOrder/product/index?id="+serviceTypeId+"&&isFangjianIndex="+this.isFangjianIndex+"&&shanpingdata="+JSON.stringify(this.shanpingdata)
					})
				}else{
					uni.navigateTo({
						url:"/pages/packageOrder/product/index?id="+serviceTypeId+"&&isFangjianIndex="+this.isFangjianIndex
					})
				}
			}else{
				uni.showToast({
					title: '请配置户型房间',
					icon:"none",
					duration: 1000
				});
			}
			
		},
		//获取所有服务类目
		getServiceTypeAllFC: async function(){
			const getServiceTypeAll = await this.$ajax.getServiceTypeAll({
				
			})
			for(var i=0;i<getServiceTypeAll.data.data.length;i++){
				//这里先暂时写死  后续功能增加再改（方案报价）
				if(getServiceTypeAll.data.data[i].serviceTypeId==1){
					this.fabjServiceTyData=getServiceTypeAll.data.data[i]
				}
			}
			// 暂时写死
			this.serviceTypeId=this.fabjServiceTyData.serviceTypeId
			console.log("服务类目_方案报价：",this.fabjServiceTyData)
			
			
		},
		// 获取系统配置信息 服务工时单价
		getSysConfigInfoFC: async function(id){
			const getSysConfigInfo = await this.$ajax.getSysConfigInfo({
				id:id
			})
			console.log("服务工时单价",getSysConfigInfo)
			this.SERVICE_HOURS_DAY=parseInt(getSysConfigInfo.data.data.data.SERVICE_HOURS_DAY*100)/100//: "8", 
			this.SERVICE_HOURS_PRICE=parseInt(getSysConfigInfo.data.data.data.SERVICE_HOURS_PRICE*100)/100
		},
		// 获取系统定义的默认户型
		getDefaultHouseTypeFC: async function(){
			const getDefaultHouseType = await this.$ajax.getDefaultHouseType({
				
			})
			this.morenhuxingData=getDefaultHouseType.data.data
			
			this.roomEntityList=this.morenhuxingData.rooms
			for (var i=0;i<this.roomEntityList.length;i++) {
				this.roomEntityList[i].roomProductList=[]
				this.roomEntityList[i].roomProductEntityList=[]
			}
			this.getProductLocationAllFC()
			
			// console.log("getDefaultHouseType：",getDefaultHouseType)
		},
		
		// 获取方案横列
		getProgrammeTypeAllFC: async function(id){
			
			const getProgrammeTypeAll = await this.$ajax.getProgrammeTypeAll({
				pageNum: this.pageNum,
				pageSize: this.pageSize
			})
			// console.log("getProgrammeTypeAll：",getProgrammeTypeAll)
			this.fangandata=getProgrammeTypeAll.data.data.records
			this.getProgrammesByTypeIdFC(this.fangandata[this.isMyfangan].id)
			// console.log("getProgrammeTypeAll：",this.fangandata)
			
		},
		// 获取所有产品安装位置
		getProductLocationAllFC: async function(){
			
			const getProductLocationAll = await this.$ajax.getProductLocationAll({
			})
			this.allLocation=getProductLocationAll.data.data
			console.log("getProductLocationAll：",this.allLocation)
			this.locationListFC()
			
		},
		// 获取方案列表
		getProgrammesByTypeIdFC: async function(id){
			const getProgrammesByTypeId = await this.$ajax.getProgrammesByTypeId({
				pageNum: this.pageNum,
				pageSize: this.pageSize,
				id: id
			})
			console.log("getProgrammesByTypeId:",getProgrammesByTypeId.data.data)
			if(getProgrammesByTypeId.data.code==200){
				this.fanganshuju=getProgrammesByTypeId.data.data
			}
			console.log("fanganshuju:",this.fanganshuju)
		},
		navHouseType(){
			uni.navigateTo({
				url:"/pages/packageOrder/houseType/index/index?morenhuxingData="+JSON.stringify(this.morenhuxingData)+"&&fuwutongji="+JSON.stringify(this.fuwutongji)
			})
		},
		
		
		
		
		
		
		
		saveOrUpdateProgrammesFC: async function(programme){
			const saveOrUpdateProgrammes = await this.$ajax.saveOrUpdateProgrammes(programme)
			console.log("方案保存：",saveOrUpdateProgrammes)
			this.getProgrammeTypeAllFC()
		},
    }
  }
</script>

<style>
	.scroll-view_H {
		white-space: nowrap;
		width: 580upx;
	}
	.scroll-view_w{
		height: 270upx;
		padding-top: 30upx;
	}
	
	.view_1 {
		background-size: 100% 100%;
		background-repeat: no-repeat;
		color: white;
	}
	.fuwuLMview{
		width: 650upx;
		margin: 0 20upx;
		background-color: white;
		border-radius: 10upx;
		height: 90upx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding:0 30upx;
		font-size: 28upx;
		font-weight: bold;
		
	}
	.fangjianview{
		width: 710upx;
		margin: 0 20upx;
		background-color: white;
		border-radius: 10upx;
		
		/* padding:0 30upx; */
		margin-top: 30upx;
		padding-bottom: 10upx;
		padding-top: 10upx;
		
	}
	.fangjiantitle{
		
		margin-right: 60upx;
		font-size: 30upx;
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		font-size: 26upx;
		
		
	}
	.yuanzhu{
		width: 8upx;
		height: 30upx;
		color: deepskyblue;
		background: linear-gradient(70deg, skyblue,deepskyblue );
		margin-right: 10upx;
		border-radius: 10upx;
		
	}
	.textConter{
		width: 750upx;
		height: auto;
		margin-top: 170upx;
		background-color: rgb(238, 238, 238);
		padding-bottom: 20upx;
		padding-top: 40upx;
	}
	.fananBGview{
		display: flex;
		align-items: center;
		justify-content: center;
		
		
		padding: 0 10upx 0 20upx;
		color: rgb(16, 107, 250);
		border-radius: 100upx;
		border: 2upx solid; 
		/* border-image: linear-gradient(to right, rgb(238, 238, 238), deepskyblue) 1;padding: 5upx; */
		/* border-radius: 100upx;
		 */
		/* border-image-radius: */
	}
	.chanpingConter{
		width: auto;
		background-color: rgb(248,248,248);
		margin-top: 10upx;
		margin-bottom: 10upx;
		padding: 20upx 20upx;
		border-radius: 20upx;
	}
	.feiyongTitle{
		width: 260upx;
		font-size: 24upx;
		height: 40upx;
		color:#444;
		
	}
		
	.addchanpingView{
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 18upx 30upx;
		font-size: 28upx;
		margin: 0 20upx;
	}
		
	.chaifenBtn{
		padding: 2upx 15upx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 26upx;
		border: 2upx solid #666;
		border-radius: 20upx;
	}
	.bianjiBtn{
		padding: 2upx 15upx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 25upx;
		border-radius: 20upx;
		/* background: linear-gradient(70deg, skyblue,deepskyblue ); */
		background: linear-gradient(70deg, rgb(18,193,250),rgb(31,119,243) );
		color: aliceblue;
		margin-left: 16upx;
	}
	.addchanpingbtn{
		width: 45upx;
		height: 30upx;
		background: linear-gradient(70deg, rgb(18,193,250),rgb(31,119,243) );
		color: aliceblue;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 36upx;
		font-weight: bold;
		border-radius: 10upx;
		padding-bottom: 6upx;
	}
	.quanqunaView{
		width: 35upx;
		height: 35upx;
		border-radius: 100upx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 35upx;
		font-weight: bold;
	}
	.fuwutjView{
		padding: 6upx 20upx;
		display: flex;
	}
	.fuwutjName{
		width: 130upx;
		color: #444;
		
	}
	.fuwutjText{
		color: #666;
	}
	.fanganview{
		background-color: rgb(245, 245, 245);
		border-radius: 10upx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 10upx 20upx;
		margin-top: 10upx;
		margin-bottom: 10upx;
		font-size: 30upx;
	}
		
	.fanbubtn{
		margin: 40upx 30upx 20upx 30upx;
		padding: 12upx 0;
		display: flex;
		align-items: center;
		justify-content: center;
		background: linear-gradient(70deg, rgb(18,193,250),rgb(31,119,243) );
		font-size: 40upx;
		color: white;
		border-radius: 50upx;
		font-weight: bold;
	}
</style>
